<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>我的账单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style type="text/css">
        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }
    </style>
    <script src="__TMPL__/public/assets/wuye/js/mui.min.js"></script>
    <link href="__TMPL__/public/assets/wuye/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/wuye/css/app.css" />
    <script src="__TMPL__/public/assets/wuye/js/iconfont.js"></script>
</head>

<body>

<header class="mui-bar mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left" href="javascript:window.history.go(-1);"></a>
    <h1 class="mui-title">我的账单</h1>
    <a class="mui-icon  mui-pull-right" style="font-size: 16px;padding-top: 15px" href="payquery.html"></i>账单详情
    </a>
</header>
{:widget('Wuye/nav')}
<div class="mui-content">
    <div class="mui-card">
        {:widget('Wuye/info')}
    </div>
    <notempty name="list">
        <button class="mui-btn mui-btn-danger btn-do-it" style="width: 33%;margin:10px 33%;" >一键缴费</button>
        <else/>
        <button class="mui-btn mui-btn-outlined" style="width: 33%;margin:10px 33%;" >一键缴费</button>
    </notempty>
    <empty name="list">
        <h3 style="color: orangered;">暂无待缴费数据</h3>
    </empty>
<notempty name="list">
<h6 style="color: orangered;">您还有未缴的费用：</h6>
    <ul class="mui-table-view">
        <volist name="list" id="vo">
            <li class="mui-table-view-cell mui-media">
                <a href="javascript:;">
                    <span class="mui-pull-right" style="color: red;font-weight: 700;font-size: 20px;">￥{$vo.num|default=''}</span>
                    <div class="mui-media-body">
                        {$vo.name|default=''}
                        <p class="mui-ellipsis">{$vo.start_time|default=''}<notempty name="$vo.end_time">----</notempty>{$vo.end_time|default=''}</p>
                    </div>
                </a>
            </li>
        </volist>
    </ul>
</notempty>
</div>
<script src="__TMPL__/public/assets//js/jquery-1.10.2.min.js"></script>
<script src="__TMPL__/public/assets//js/layer.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script>
    $(function(){
        $(".btn-do-it").click(function(){
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest', {$config},
                function(res){
                    if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                        window.location.href="{:url('portal/wuye/payquery',['isPay'=>'isPay'])}";
                    }
                    if(res.err_msg == "get_brand_wcpay_request:cancel" ) {
                        layer.msg("已取消缴费");
                    }
                }
            );
        });
    });
</script>
</body>
</html>